import random

randomintlist = []
for i in range(100):
    randomintlist.append(random.randint(0,500))

print(randomintlist,"---")

def pai(array):
    if len(array) < 2:
        return array

    point = array[0]
    left = []
    right = []

    for i in array[1:]:
        if i < point:
            left.append(i)
        if i >= point:
            right.append(i)

    return pai(left) + [point] + pai(right)

print(pai(randomintlist))